package cn.lysy.xiaoruan.model;

import cn.lysy.xiaoruan.services.GoodsService;
import cn.lysy.xiaoruan.services.UserService;
import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

import static cn.lysy.xiaoruan.ServicesAddress.ServicesAddress.SERVICES_ADDRESS;

/**
 * Created by Sawyer on 2017/10/16.
 */

public class GoodsModel {
    private Retrofit retrofit;
    public GoodsModel(){
        retrofit = new Retrofit.Builder()
                .baseUrl(SERVICES_ADDRESS)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }
    public Call Goodlist(int genreID){
        GoodsService goodsService=retrofit.create(GoodsService.class);
        return goodsService.goodList(genreID);
    }
}
